<%@ page pageEncoding="utf-8" import="java.util.*" %>
<%@ page import="DoMain.Student" %>
<%@ page import="DoMain.CriteriaStudent" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <title>查看入住学生</title>
    <script type="text/javascript" src="script/jquery-3.3.1.js"></script>
    <script type="text/javascript">

		$(function(){
			
			$(".export").click(function(){
				
				var content=$(this).parent().parent().find("td:eq(1)").text();
				var flag=confirm("确定要导出"+content+"的晚归登记信息吗？");
				
				return flag;
				
			});	
		});
</script>
  </head>
  <body>

  <div class="input-group">
  <span>筛选查看条件</span>
  <select onchange="window.location=this.value">
  <option value="queryAll.So">全部</option>
  <option value="queryNoRegist.So">未登记</option>
  <option value="queryRegisted.So">已登记</option>
  </select>
  
  </div>

  <%
  		List<Student> student2=(List<Student>)request.getAttribute("student2");
  		
  		%>
  	
  	  <table class="table table-hover">

    <tr class="table-primary" align="center">
      <th scope="col" align="center">学生学号</th>
      <th scope="col" align="center">学生姓名</th>
      <th scope="col" align="center">性别</th>
      <th scope="col" align="center">班别</th>
      <th scope="col" align="center">楼栋</th>
      <th scope="col" align="center">宿舍号</th>
      <th scope="col" align="center">晚归原因</th>
      <th scope="col" align="center">是否被登记</th>
    </tr>


 			 <c:forEach items="${student2}" var="st">
			<tr  class="table-light">
				<td class="table-success" scope="row" align="center">${st.studentNo}</td>
				<td class="table-success" scope="row" align="center">${st.studentName}</td>
				<td class="table-warning" scope="row" align="center">${st.sex}</td>
				<td class="table-warning" scope="row" align="center">${st.className}</td>
				<td class="table-warning" scope="row" align="center">${st.dormName}</td>
				<td class="table-warning" scope="row" align="center">${st.roomNo}</td>
				<td class="table-warning" scope="row" align="center">${st.lateReason}</td>
				<td class="table-warning" scope="row" align="center">${st.regist}</td>
			
			</tr>
			</c:forEach>
  	</table>
  	  	<a href="testExcel.jsp">导出所有名单</a>
  </body>
  </html>